package com.hsteach.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class SeasonUtil {

    private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy");

    public static String getSeasonStr(Date date) {

        String format = sdf.format(date);

        int month = date.getMonth();
        if (month>=3 && month<=5){
            return format + "年春季";
        }else if(month>5 && month<=8){
            return format + "年夏季";
        }else if(month>8 && month<=11){
            return format + "年秋季";
        }else if(month==1 || month==2 || month==12){
            return format + "年冬季";
        }else{
            return "";
        }

    }
}
